﻿<?php
if(getGP('inputname','P')!=''){
$participation=getGP('inputname','P');
}else
{
$participation='participation';
}
//----------------------------------------
$puboaid="0";
$puboaname="0";
$department = $_POST['vid'];   
for($i=0;$i<count($department);$i++)
{
$puboaid=$puboaid.",".$_POST['oaid'.$department[$i].''];
$puboaname=$puboaname.",".$_POST['oaname'.$department[$i].''];
//echo $weeks[$i]."<br>";
}
//echo $participation."phone";
//exit;
echo "<script>window.opener.document.save.".$participation.".value='".str_replace("0,"," ",$puboaname)."';</script>";
echo "<script>window.opener.document.save.".$participation."id.value='".str_replace("0,"," ",$puboaid)."';</script>";
echo '<script language="JavaScript">window.close()</script>';
?>
